<template>
  <div class="list">
  <list></list>
  <li v-for="item in shoplist" :key="item.id">
    <img :src="item.src" class="tu"/>
  		<p class="title">{{item.title}}</p>
  		 <p class="price">￥{{item.price}}</p> 
  		 <button @click="add()">删除</button>
  </li>
  <p>商品总价 ￥36.01</p>
  </div>
</template>

<script>
// @ is an alias to /src
import list from '@/views/list.vue'

export default{
			name:'shoplist',
			data(){
				return {
					shoplist:[  { 'id': 1, 'title': '电水壶', 'price': 50.01,src: 'images/1.jpg' },
		  { 'id': 2, 'title': '电压力锅', 'price': 260.99, src: 'images/2.jpg' },
		
			]
			}
			}}
	
</script>
<style>
	li{
		list-style-type:none;
		text-align:left;
		margin-top: 50px;
	}
	
	button{
		background-color: coral;
		color: white;
		border: 0px;
	}
	.price{
		color: red;
	}
	.tu{
		float: left;
	}
	
</style>